<template>
    <div class="statisticsContent">


        <div v-if="showFlag" class="">

            <div class="contentTop">
                <div class="titleBox">
                    <div class="leftbox">
                        <div class="titleitem">课外阅读-2</div>
                        <div class="ms">自由模式</div>
                    </div>

                    <div>
                        已有0人完成练习，还有1人未完成
                    </div>
                </div>

                <div class="screen_Content">
                    <div class="screen_box">
                        <div class="lable">
                            完成度：
                        </div>
                        <div class="screen_cintent">
                            <div class="cintentitem" :class="{ cintentitemed: completeCurrindex == index }"
                                v-for="(item, index) in completeList" :key="index" @click="handleChangecintent(index)">
                                {{ item.name }}
                            </div>
                        </div>
                    </div>
                    <div class="loadBtn">
                        导出EXCEL
                    </div>

                </div>
            </div>

            <div class="studentList">
                <div class="lableContent">
                    <div class="" style="width: 10%;">
                        序号
                    </div>
                    <div class="" style="width: 30%;">
                        提分卡学生
                    </div>
                    <div class="" style="width: 10%;">
                        最优成绩
                    </div>
                    <div class="" style="width: 10%;">
                        首轮成绩
                    </div>
                    <div class="" style="width: 10%;">
                        积分
                    </div>
                    <div class="" style="width: 10%;">
                        星星
                    </div>
                    <div class="" style="width: 10%;">
                        练习进度
                    </div>
                    <div class="" style="width: 10%;">
                        完成时间
                    </div>
                </div>

                <div class="listContent">
                    <div class="listitem" v-for="(item, index) in 6" :key="index" @click="handleUserdetail">
                        <div style="width: 10%;">{{ index + 1 }}</div>
                        <div class="userinfo" style="width: 30%;">
                            <img src="@/static/image/logo.png" alt="" srcset="">
                            <div>妍与韩</div>
                        </div>
                        <div style="width: 10%;">
                            100
                        </div>
                        <div style="width: 10%;">
                            95
                        </div>
                        <div style="width: 10%;">
                            5
                        </div>
                        <div style="width: 10%;">
                            -
                        </div>
                        <div style="width: 10%;">
                            50%
                        </div>
                        <div style="width: 10%;">
                            10/20 21:30
                        </div>
                    </div>
                </div>

            </div>
        </div>

        <div v-else>
            <div class="userDetail">

                <div class="userInfo">
                    <div class="userInfo_left">
                        <img src="@/static/image/logo.png" alt="" srcset="">
                        <div class="message">
                            <div class="name">
                                妍与韩
                            </div>
                            <div>
                                课外阅读-2 <span style="color: #3FB9E2;">自由模式</span>
                            </div>
                        </div>
                    </div>
                    <div class="closeicon" @click="handleClose">
                        关闭
                    </div>
                </div>

                <div class="questionContent">

                    <div class="lableContent">
                        <div style="width: 5%;">
                            序号
                        </div>
                        <div style="width: 65%;">
                            大题名称
                        </div>
                        <div style="width: 15%;">
                            最优成绩
                        </div>
                        <div style="width: 15%;">
                            首轮成绩
                        </div>
                    </div>


                    <div class="listtable">
                        <div class="listitem" v-for="(item, index) in 5" :key="index">
                            <div style="width: 5%;">
                                {{ index + 1 }}
                            </div>
                            <div class="question" style="width: 65%;">
                                <img src="@/static/image/tx.png" alt="" srcset="">
                                <div class="title">
                                    还原单词
                                </div>
                                <div class="desc">
                                    1A Unit9 Lesson17 说一说 PartC 新 
                                </div>
                            </div>

                            <div style="width: 15%;">
                                100
                            </div>
                            <div style="width: 15%">
                                95
                            </div>
                        </div>

                    </div>

                </div>

            </div>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            showFlag: true,
            completeCurrindex: 0,
            completeList: [
                { name: '全部', id: 0 }, { name: '未完成', id: 1 }, { name: '已完成', id: 2 },
            ],
        }
    },
    methods: {
        handleChangecintent(value) {
            this.completeCurrindex = value
        },

        handleUserdetail() {
            this.showFlag = false
        },

        handleClose() {
            this.showFlag = true
        },
    }
}

</script>
<style scoped lang="scss">
.statisticsContent {
    width: 100%;
    margin-top: 16px;

    .contentTop {
        width: 100%;
        background-color: #ffffff;
        padding: 20px;
        box-sizing: border-box;
    }

    .titleBox {
        font-family: PingFang SC, PingFang SC;
        font-weight: 400;
        font-size: 12px;
        color: #333333;
        line-height: 14px;
        display: flex;
        align-items: center;

        .leftbox {
            display: flex;
            align-items: center;
            margin-right: 20px;

            .titleitem {
                font-weight: 550;
                font-size: 14px;
                color: #333333;
            }

            .ms {
                font-weight: 500;
                font-size: 12px;
                color: #3FB9E2;
                line-height: 20px;
                margin-left: 5px;
            }
        }
    }

    .screen_Content {
        margin-top: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;


        .screen_box {
            display: flex;
            align-items: center;
            margin-right: 80px;

            .lable {
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 12px;
                color: #777777;
                line-height: 14px;
            }

            .screen_cintent {
                display: flex;
                align-items: center;
                margin-left: 10px;

                .cintentitem {
                    width: 68px;
                    height: 34px;
                    border-radius: 0px 0px 0px 0px;
                    border: 1px solid #777777;
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 12px;
                    color: #777777;
                    line-height: 34px;
                    text-align: center;
                    cursor: pointer;
                }

                .cintentitem:first-child {
                    border-radius: 4px 0px 0px 4px;
                }

                .cintentitem:last-child {
                    border-radius: 0px 4px 4px 0px;
                }

                .cintentitemed {
                    background: #EAF9E8;
                    border: 1px solid #4BA840;
                    color: #4BA840;
                }

            }
        }

        .loadBtn {
            width: 120px;
            height: 40px;
            border-radius: 4px 4px 4px 4px;
            border: 1px solid #4BA840;
            font-family: PingFang SC, PingFang SC;
            font-weight: 500;
            font-size: 14px;
            color: #4BA840;
            line-height: 40px;
            text-align: center;
            cursor: pointer;
        }
    }


    .studentList {
        width: 100%;
        background: #FFFFFF;
        border-radius: 4px 4px 4px 4px;
        padding: 16px;
        box-sizing: border-box;
        margin-top: 16px;

        .lableContent {
            display: flex;
            align-items: center;
            font-family: PingFang SC, PingFang SC;
            font-weight: 400;
            font-size: 12px;
            color: rgba(0, 0, 0, 0.4);
            line-height: 20px;
        }

        .listContent {
            .listitem {
                display: flex;
                align-items: center;
                height: 52px;
                background: #FFFFFF;
                border-top: 1px solid #E7E7E7;
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 12px;
                color: rgba(0, 0, 0, 0.9);
                line-height: 20px;
                cursor: pointer;

                .userinfo {
                    display: flex;
                    align-items: center;
                }

                img {
                    width: 40px;
                    height: 40px;
                    border-radius: 40px;
                    margin-right: 12px;
                }
            }

            .listitem:hover {
                background-color: #EAF9E8;
            }
        }
    }


    .userDetail {
        width: 100%;
        padding: 16px;
        box-sizing: border-box;
        background-color: #ffffff;

        .userInfo {
            display: flex;
            align-items: center;
            justify-content: space-between;

            .userInfo_left {
                display: flex;
                align-items: center;
                font-family: PingFang SC, PingFang SC;
                font-weight: 500;
                font-size: 14px;
                color: #333333;

                img {
                    width: 60px;
                    height: 60px;
                    border-radius: 60px;
                }

                .message {
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 12px;
                    color: #AAAAAA;
                    line-height: 14px;
                    height: 40px;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    margin-left: 10px;

                    .name {
                        color: #333333;
                        font-weight: 550;
                    }
                }

            }

            .closeicon {
                font-family: PingFang SC, PingFang SC;
                font-weight: 550;
                font-size: 15px;
                color: #4BA840;
                cursor: pointer;
            }

        }

        .questionContent {
            margin-top: 26px;

            .lableContent {
                display: flex;
                align-items: center;
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 12px;
                color: rgba(0, 0, 0, 0.4);
                line-height: 20px;
            }

            .listtable {
                .listitem {
                    display: flex;
                    align-items: center;
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 12px;
                    color: rgba(0, 0, 0, 0.9);
                    line-height: 20px;
                    height: 48px;
                    border-top: 1px solid #E7E7E7;
                    cursor: pointer;

                    .question {
                        display: flex;
                        align-items: center;

                        img {
                            width: 18.99px;
                            height: 18.99px;
                        }

                        .title {
                            margin: 0 10px;
                        }

                        .desc {
                            color: #4BA840;
                        }
                    }
                }

                .listitem:hover {
                    background-color: #EAF9E8;
                }
            }
        }

    }


}
</style>